from datetime import *

if __name__ == '__main__':
      old_shijian=date(2012,12,21)#创建过去时间
      print(old_shijian)
      new_shijian=date.today()#用today函数获取今天的日期

      print(new_shijian.strftime("%Y-%m-%d"))
      shijian_vaule=new_shijian-old_shijian#时间差相减
      print(shijian_vaule.days)